home *** CD-ROM | disk | FTP | other *** search
/ PCGUIA 127 / PC Guia 127.iso / Software / Utils / GParted Live CD / Bin / gparted-livecd-0.2.2.iso / bin / lang < prev    next >
Encoding:
Text File  |  2006-02-14  |  6.1 KB  |  359 lines

  1. #!/bin/sh
  2. ############################################################################
  3. #    Copyright (C) 2005 by Patrick J. Verner                               #
  4. #    exodusrobot@yahoo.com                                                 #
  5. #                                                                          #
  6. #    This program is free software; you can redistribute it and/or modify  #
  7. #    it under the terms of the GNU General Public License as published by  #
  8. #    the Free Software Foundation; either version 2 of the License, or     #
  9. #    (at your option) any later version.                                   #
  10. ############################################################################
  11.  
  12. #make sure temp exists
  13. temp=/tmp/lang
  14. temp1=/tmp/lang
  15. if [ ! -d $temp1 ]
  16.   then
  17.     mkdir -p $temp1
  18.     chmod 700 $temp1
  19. fi
  20.  
  21. #These don't work yet, PLEASE! help me remove them from the "doesn't work" list :)
  22. #"Bulgarian" "" \ - doesn't work yet!
  23. #"Hebrew" "" \ - doesn't work yet!
  24. #"Macedonian" "" \ - doesn't work yet!
  25. #"Punjabi" "" \ - doesn't work yet!
  26. #"Russian" "" \ - doesn't work yet!
  27. #"Kinyarwanda" "" \ - doesn't work yet!
  28. #"Ukrainian" "" \ - doesn't work yet!
  29. #"Simplified Chinese" "" \ - doesn't work yet!
  30. #"Traditional Chinese" "" \ - doesn't work yet!
  31.  
  32. #**********main menu**********
  33. item="US English"
  34. while [ 0 ]
  35.   do
  36. dialog --title "GParted LiveCD Language" --default-item "$item" --backtitle "GParted Livecd" --menu "Select your Language:" 20 40 11 \
  37. "US English" "" \
  38. "Catalan" "" \
  39. "Czech" "" \
  40. "German" "" \
  41. "Greek" "" \
  42. "British English" "" \
  43. "Spanish" "" \
  44. "Finnish" "" \
  45. "French" "" \
  46. "Galician" "" \
  47. "Hungarian" "" \
  48. "Lithuanian" "" \
  49. "Dutch" "" \
  50. "Portuguese" "" \
  51. "Swedish" "" \
  52. "Vietnamese" "" \
  53. 2> $temp1/return
  54. if [ ! $? = 0 ]
  55.   then
  56.     break
  57. fi
  58. REPLY=`cat $temp1/return`
  59. rm -f $temp1/return
  60.  
  61. #US ENGLISH
  62. if [ "$REPLY" = "US English" ]
  63.   then
  64. cat >> ~/.xinitrc << "EOF"
  65. #!/bin/sh
  66. startfluxbox
  67. EOF
  68. chmod a+rwx /root/.xinitrc
  69. break
  70. fi
  71.  
  72. #Bulgarian
  73. #if [ "$REPLY" = "Bulgarian" ]
  74. #  then
  75. #cp /root/lang/Bulgarian /root/.fluxbox/apps
  76. #LC_ALL=bg_BG - doesn't work yet!
  77. #break
  78. #fi
  79.  
  80. #Catalan
  81. if [ "$REPLY" = "Catalan" ]
  82.   then
  83. cat >> ~/.xinitrc << "EOF"
  84. #!/bin/sh
  85. LC_ALL=ca_ES
  86. startfluxbox
  87. EOF
  88. chmod a+rwx /root/.xinitrc
  89. #LC_ALL=ca_ES
  90. break
  91. fi
  92.  
  93. #Czech
  94. if [ "$REPLY" = "Czech" ]
  95.   then
  96. cat >> ~/.xinitrc << "EOF"
  97. #!/bin/sh
  98. LC_ALL=cs_CZ
  99. startfluxbox
  100. EOF
  101. chmod a+rwx /root/.xinitrc
  102. #LC_ALL=cs_CZ
  103. break
  104. fi
  105.  
  106. #German
  107. if [ "$REPLY" = "German" ]
  108.   then
  109. cat >> ~/.xinitrc << "EOF"
  110. #!/bin/sh
  111. LC_ALL=de_DE
  112. startfluxbox
  113. EOF
  114. chmod a+rwx /root/.xinitrc
  115. #LC_ALL=de_DE
  116. break
  117. fi
  118.  
  119. #Greek
  120. if [ "$REPLY" = "Greek" ]
  121.   then
  122. cat >> ~/.xinitrc << "EOF"
  123. #!/bin/sh
  124. LC_ALL=el_GR
  125. startfluxbox
  126. EOF
  127. chmod a+rwx /root/.xinitrc
  128. #LC_ALL=el_GR
  129. break
  130. fi
  131.  
  132. #British English
  133. if [ "$REPLY" = "British English" ]
  134.   then
  135. cat >> ~/.xinitrc << "EOF"
  136. #!/bin/sh
  137. LC_ALL=en_GB
  138. startfluxbox
  139. EOF
  140. chmod a+rwx /root/.xinitrc
  141. #LC_ALL=en_GB
  142. break
  143. fi
  144.  
  145. #Spanish
  146. if [ "$REPLY" = "Spanish" ]
  147.   then
  148. cat >> ~/.xinitrc << "EOF"
  149. #!/bin/sh
  150. LC_ALL=es_ES
  151. startfluxbox
  152. EOF
  153. chmod a+rwx /root/.xinitrc
  154. #LC_ALL=es_ES
  155. break
  156. fi
  157.  
  158. #Finnish
  159. if [ "$REPLY" = "Finnish" ]
  160.   then
  161. cat >> ~/.xinitrc << "EOF"
  162. #!/bin/sh
  163. LC_ALL=fi_FI
  164. startfluxbox
  165. EOF
  166. chmod a+rwx /root/.xinitrc
  167. #LC_ALL=fi_FI
  168. break
  169. fi
  170.  
  171. #French
  172. if [ "$REPLY" = "French" ]
  173.   then
  174. cat >> ~/.xinitrc << "EOF"
  175. #!/bin/sh
  176. LC_ALL=fr_FR
  177. startfluxbox
  178. EOF
  179. chmod a+rwx /root/.xinitrc
  180. #LC_ALL=fr_FR
  181. break
  182. fi
  183.  
  184. #Galician
  185. if [ "$REPLY" = "Galician" ]
  186.   then
  187. cat >> ~/.xinitrc << "EOF"
  188. #!/bin/sh
  189. LC_ALL=gl_ES
  190. startfluxbox
  191. EOF
  192. chmod a+rwx /root/.xinitrc
  193. #LC_ALL=gl_ES
  194. break
  195. fi
  196.  
  197. #Hebrew
  198. #if [ "$REPLY" = "Hebrew" ]
  199. #  then
  200. #cp /root/lang/Hebrew /root/.fluxbox/apps
  201. #cp /root/lang/Hebrewm /root/.fluxbox/menu
  202. #LC_ALL=he_IL - doesn't work yet!
  203. #break
  204. #fi
  205.  
  206. #Hungarian
  207. if [ "$REPLY" = "Hungarian" ]
  208.   then
  209. cat >> ~/.xinitrc << "EOF"
  210. #!/bin/sh
  211. LC_ALL=hu_HU
  212. startfluxbox
  213. EOF
  214. chmod a+rwx /root/.xinitrc
  215. #LC_ALL=hu_HU
  216. break
  217. fi
  218.  
  219. #Italian
  220. if [ "$REPLY" = "Italian" ]
  221.   then
  222. cat >> ~/.xinitrc << "EOF"
  223. #!/bin/sh
  224. LC_ALL=it_IT
  225. startfluxbox
  226. EOF
  227. chmod a+rwx /root/.xinitrc
  228. #LC_ALL=it_IT
  229. break
  230. fi
  231.  
  232. #Lithuanian
  233. if [ "$REPLY" = "Lithuanian" ]
  234.   then
  235. cat >> ~/.xinitrc << "EOF"
  236. #!/bin/sh
  237. LC_ALL=lt_LT
  238. startfluxbox
  239. EOF
  240. chmod a+rwx /root/.xinitrc
  241. #LC_ALL=lt_LT
  242. break
  243. fi
  244.  
  245. #Macedonian
  246. #if [ "$REPLY" = "Macedonian" ]
  247. #  then
  248. #cp /root/lang/Macedonian /root/.fluxbox/apps
  249. #cp /root/lang/Macedonianm /root/.fluxbox/menu
  250. #LC_ALL=mk_MK - doesn't work yet!
  251. #break
  252. #fi
  253.  
  254. #Dutch
  255. if [ "$REPLY" = "Dutch" ]
  256.   then
  257. cat >> ~/.xinitrc << "EOF"
  258. #!/bin/sh
  259. LC_ALL=nl_NL
  260. startfluxbox
  261. EOF
  262. chmod a+rwx /root/.xinitrc
  263. #LC_ALL=nl_NL
  264. break
  265. fi
  266.  
  267. #Punjabi
  268. #if [ "$REPLY" = "Punjabi" ]
  269. #  then
  270. #cp /root/lang/Punjabi /root/.fluxbox/apps
  271. #cp /root/lang/Punjabim /root/.fluxbox/menu
  272. #LC_ALL=pa_IN  - doesn't work yet!
  273. #break
  274. #fi
  275.  
  276. #Portuguese
  277. if [ "$REPLY" = "Portuguese" ]
  278.   then
  279. cat >> ~/.xinitrc << "EOF"
  280. #!/bin/sh
  281. LC_ALL=pt_PT
  282. startfluxbox
  283. EOF
  284. chmod a+rwx /root/.xinitrc
  285. #LC_ALL=pt_PT
  286. break
  287. fi
  288.  
  289. #Russian
  290. #if [ "$REPLY" = "Russian" ]
  291. #  then
  292. #cp /root/lang/Russian /root/.fluxbox/apps
  293. #cp /root/lang/Russianm /root/.fluxbox/menu
  294. #LC_ALL=ru_RU - doesn't work yet!
  295. #break
  296. #fi
  297.  
  298. #Kinyarwanda
  299. #if [ "$REPLY" = "Kinyarwanda" ]
  300. #  then
  301. #cp /root/lang/Kinyarwanda /root/.fluxbox/apps
  302. #cp /root/lang/Kinyarwandam /root/.fluxbox/menu
  303. #LC_ALL=rw_RW - doesn't work yet!
  304. #break
  305. #fi
  306.  
  307. #Swedish
  308. if [ "$REPLY" = "Swedish" ]
  309.   then
  310. cat >> ~/.xinitrc << "EOF"
  311. #!/bin/sh
  312. LC_ALL=sv_SE
  313. startfluxbox
  314. EOF
  315. chmod a+rwx /root/.xinitrc
  316. #LC_ALL=sv_SE
  317. break
  318. fi
  319.  
  320. #Ukrainian
  321. #if [ "$REPLY" = "Ukrainian" ]
  322. #  then
  323. #cp /root/lang/Ukrainian /root/.fluxbox/apps
  324. #cp /root/lang/Ukrainianm /root/.fluxbox/menu
  325. #LC_ALL=uk_UA - doesn't work yet!
  326. #break
  327. #fi
  328.  
  329. #Vietnamese
  330. if [ "$REPLY" = "Vietnamese" ]
  331.   then
  332. cat >> ~/.xinitrc << "EOF"
  333. #!/bin/sh
  334. LC_ALL=vi_VN
  335. startfluxbox
  336. EOF
  337. chmod a+rwx /root/.xinitrc
  338. #LC_ALL=vi_VN
  339. break
  340. fi
  341.  
  342. #Simplified Chinese
  343. #if [ "$REPLY" = "Simplified Chinese" ]
  344. #  then
  345. #cp /root/lang/SimplifiedChinese /root/.fluxbox/apps
  346. #cp /root/lang/SimplifiedChinesem /root/.fluxbox/menu
  347. #LC_ALL=zh_CN - doesn't work yet!
  348. #break
  349. #fi
  350.  
  351. #Traditional Chinese
  352. #if [ "$REPLY" = "Traditional Chinese" ]
  353. #  then
  354. #cp /root/lang/TraditionalChinese /root/.fluxbox/apps
  355. #cp /root/lang/TraditionalChinesem /root/.fluxbox/menu
  356. #LC_ALL=zh_TW - doesn't work yet!
  357. #break
  358. #fi
  359. done